<%@ page language="java"  pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>修改企业</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
  <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/validform/css/demo.css" type="text/css"></link>
  <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/validform/css/style.css" type="text/css"></link>
  <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/admin/css/add.css" type="text/css"></link>
  <script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/jquery-1.9.1.min.js"></script>
 </head>
  
  <body>
  <form  id="myForm" name="myForm"  action="<%=request.getContextPath() %>/user!updateUserPassword.action" suc_url="<%=request.getContextPath() %>/user!searchUser.action?page=${request.curPage}" class="myform"  enctype="multipart/form-data">
  	<div id="inside_content">
		<div id="dynamic">你现在所在的位置：用户管理>>编辑用户</div>
		<div id="add_content">
			<div id="add_title">
				&nbsp;编辑用户
				<ul>
					<li><input type="submit" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add.png) top left no-repeat;"/></li>
					<li><input type="reset" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add_reset.png) top left no-repeat;"/></li>
					<li><input  onclick="back();" type="button" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add_return.png) top left no-repeat;"/></li>
				</ul>
			</div>
			<table id="table_content"  >
	 			<tr>
		 			<td >新密码</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="password" errormsg="密码范围在6~16位之间！" nullmsg="请设置密码！" datatype="*6-16" name="password" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >确认新密码</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="password" errormsg="您两次输入的账号密码不一致！" nullmsg="请再输入一次密码！" recheck="password" datatype="*" tip="test" name="userpassword2" value="">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >姓名</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" name="xm" errormsg="您输入中文名字！" ignore="ignore" value="${requestScope.user.xm}" datatype="*">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			
	 			<tr>
		 			<td >性别</td>
		 			<td style="width: 200px;">
		 				<c:if test="${requestScope.user.sex == 0}"> 
							<img src="/isp/resources/admin/images/boy.png">
							<input id="sex" type="radio" value="0" name="sex"  checked="checked">	
							<img src="/isp/resources/admin/images/girl.png">
							<input id="sex" type="radio" value="1" name="sex">
						</c:if>
						<c:if test="${requestScope.user.sex == 1}"> 
							<img src="/isp/resources/admin/images/boy.png">
							<input id="sex" type="radio" value="0" name="sex">	
							<img src="/isp/resources/admin/images/girl.png">
							<input id="sex" type="radio" value="1" name="sex" checked="checked">
						</c:if>
						
		 			</td>
	 			</tr>
	 			<tr>
		 			<td >移动电话</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" errormsg="您输入的手机号码格式错误！" ignore="ignore"  datatype="m"  name="phone" value="${requestScope.user.phone}">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>	 			
	 			<tr>
		 			<td >QQ</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" errormsg="您输入的QQ格式错误！" ignore="ignore"  datatype="n5-11"  name="qq" value="${requestScope.user.qq}">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >E-Mail</td>
		 			<td style="width: 200px;">
		 				<input class="inputxt" type="text" errormsg="您输入的email格式错误！" ignore="ignore"  datatype="e"  name="email" value="${requestScope.user.email}">
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >是否启用</td>
		 			<td style="width: 200px;">
		 				<button class="mwui-switch-btn"><span change="否">是</span><input type="hidden" name="sfqy" value="1" /></button>	
		 			</td>
	 			</tr>
	 			<tr>
		 			<td >岗位</td>
		 			<td style="width: 200px;">
		 				<select id="role_id" name="role_id">
							<c:if test="${sessionScope.user.role_id==1 && sessionScope.user.role_id != requestScope.user.role_id}"> 
								<option value="2" selected = "selected">权限二</option>
								<option value="3">权限三</option>
							</c:if>
							<c:if test="${sessionScope.user.role_id==2 && sessionScope.user.role_id != requestScope.user.role_id}"> 
								<option value="3"  selected = "selected">权限三</option>
							</c:if>
							<c:if test="${sessionScope.user.role_id == requestScope.user.role_id}"> 
								<c:if test="${requestScope.user.role_id == 1}"> 
								<option value="1"  selected = "selected">权限一</option>
								</c:if>	
								<c:if test="${requestScope.user.role_id == 2}"> 
								<option value="2"  selected = "selected">权限二</option>
								</c:if>	
								<c:if test="${requestScope.user.role_id == 3}"> 
								<option value="3"  selected = "selected">权限三</option>
								</c:if>	
							</c:if>
						</select>
		 			</td>
	 			</tr>
			</table>
			<div class="clear"></div>
		</div>
	</div>
	<input  id="id"  name="id" type="hidden" value="${request.user.id}" />
</form>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/jquery.form.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/validform/js/Validform_v5.3.2.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/common.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/opform.js"></script>
 </body>
 <script type="text/javascript">
	$(function() { 
		$('.mwui-switch-btn').each(function() {
			$(this).bind("click", function() { 
				var btn = $(this).find("span");
				var change = btn.attr("change");
				btn.toggleClass('off'); 

				if(btn.attr("class") == 'off') { 
					$(this).find("input").val("0");
					btn.attr("change", btn.html()); 
					btn.html(change);
				} else { 
					$(this).find("input").val("1");
					btn.attr("change", btn.html()); 
					btn.html(change);
				}  
				return false;
			});
		});
	});
</script> 
</html>
